package app.kisslinux.cn.utilsforlin;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;

import app.kisslinux.cn.utilsforlin.ui.activity.cutting_plates.CuttingPlatesActivity;
import app.kisslinux.cn.utilsforlin.ui.dialog.DialogFactory;

public class MainActivity extends AppCompatActivity implements View.OnClickListener {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        findViewById(R.id.btn_cutting_plates).setOnClickListener(this);
        findViewById(R.id.btn_other).setOnClickListener(this);

    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.btn_cutting_plates: {
                startActivity(CuttingPlatesActivity.createIntent(MainActivity.this));
                break;
            }
            case R.id.btn_other: {
                DialogFactory.instance().createSimpleDialog(MainActivity.this,
                        "说明",
                        "你要是有其它《如果有这样的工具就好了！》想法，你就给我说，我给你做。\n" +
                                "我就是做这个的^_^")
                        .show();
                break;
            }
        }
    }
}
